
import java.awt.GridLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;

/*
 * SpelBord2.java
 *
 * Created on 10 november 2009, 11:20
 */



/**
 *
 * @author  Thijs Demeulenaere
 */
public class SpelBord2 extends javax.swing.JFrame {
        private int dim = 10;
            private Vak bord[][];

    /** Creates new form SpelBord2 */
    public SpelBord2() {
        //initComponents();
        this.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);    
        this.setSize(400,400);
        
        
        
         bord = new Vak [dim][dim];
         JPanel paneel = new JPanel();
         paneel.setLayout(new GridLayout(0,10));
         for(int i=0;i<dim;i++){
             for(int j=0;j<dim;j++){
                 Vak vk = new Vak();
                 paneel.add(vk);
                 bord[i][j] = vk;  
                 System.out.println(i + " " + j);
             }
         }
         this.setContentPane(paneel);         
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                
                
                
                
                
                new SpelBord2().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

}
